package com.nut.spp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nut.spp.entity.Shop;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

@Mapper
public interface ShopMapper extends BaseMapper<Shop> {

    @Select("select * from biz_shop where member_id=#{memberId} limit 1")
    Shop selectByMemberId(@Param("memberId") Long memberId);

    IPage<Shop> listPage(Page page,
                         @Param("lon") BigDecimal lon,
                         @Param("lat") BigDecimal lat,
                         @Param("distance") Integer distance,
                         @Param("catId") Integer catId,
                         @Param("name") String name,
                         @Param("status") Integer status);

}